import { request } from '@/utils/request';

export function getProductList(data) {
  return request({
    url: '/queue/supplier-product/getPage',
    headers: {
      isToken: false
    },
    method: 'GET',
    data: data
  });
}

export function getRecordsList(data) {
  return request({
    url: '/queue/supplier-product-record/getPage',
    headers: {
      isToken: false
    },
    method: 'GET',
    data: data
  });
}

export function createProduct(data) {
  return request({
    url: '/queue/supplier-product/create',
    headers: {
      isToken: false
    },
    method: 'POST',
    data: data
  });
}
export function reportProduct(id) {
  return request({
    url: `/queue/supplier-product/report-energy/${id}`,
    headers: {
      isToken: false
    },
    method: 'POST'
  });
}
export function updateProduct(data) {
  return request({
    url: '/queue/supplier-product/update',
    headers: {
      isToken: false
    },
    method: 'PUT',
    data: data
  });
}

export function getProductById(data) {
  return request({
    url: '/queue/supplier-product/getById',
    headers: {
      isToken: false
    },
    method: 'GET',
    data: data
  });
}

export function deleteProduct(id) {
  return request({
    url: `/queue/supplier-product/delete?id=${id}`,
    headers: {
      isToken: false
    },
    method: 'DELETE'
  });
}

export function getProductByEnterId() {
  return request({
    url: '/queue/coal-enter/getProductByEnterId',
    headers: {
      isToken: false
    },
    method: 'GET'
  });
}

// export function getSimpleList() {
// 	return request({
// 		url: '/queue/cust-mgr/get-simple-list',
// 		headers: {
// 			isToken: false
// 		},
// 		'method': 'GET'
// 	})
// }
// 获取供应商精简列表
export function getSimpleList() {
  return request({
    url: '/queue/cust-mgr/get-supplier-simple-list',
    headers: {
      isToken: false
    },
    method: 'GET'
  });
}
